<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
    	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>活动结束</title>
		<script src="//cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
		<link rel="shortcut icon" href="__CDN__/assets/img/bibo.ico" type="image/x-icon">
		<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/ending.css" />
	</head>

	<body>
		<div class="header">
			<div class="header-img"><img src="__CDN__/assets/img/active/title@2x.png" /></div>
		</div>
		<div class="main3">
			<div class="main3-sec">
				<span class="main3-span1 main3-span"> </span>
				<div class="main3-title">活动结束</div>
				<span class="main3-span2 main3-span"> </span>
			</div>
			<div class="main3-sec2">
				<div class="main3-sec2-d1 main3-sec2-d">
					<img src="__CDN__/assets/img/active/icon_recom@2x.png" alt="" />
					<p>
						<span>推荐好友数量</span>
						<span>{if !empty($myInfo['recommend_num'])}{$myInfo['recommend_num']}{else /}0{/if}人</span>
					</p>
				</div>
				<div class="main3-sec2-d2 main3-sec2-d">
					<img src="__CDN__/assets/img/active/icon_coin@2x.png" alt="" />
					<p>
						<span>奖励</span>
						<span>{if !empty($myInfo['invite_quantity'])}{$myInfo['invite_quantity']}{else /}0{/if}cam</span>
					</p>
				</div>
			</div>
			<div style="text-align: center;font-size: 0.6rem;margin: 1rem 0 1rem 0;" class="no"></div>
			<div style="display: none;" class="normal">
				<hr class="hr3" />
				<div class="main3-sec3">
					<span>推荐好友</span>
					<span>奖励</span>
				</div>
				<div class="main3-sec4">
					<ul></ul>
				</div>
			</div>
		</div>

		<div class="main4">
			<div class="main4_sec">
				<dl class="main4_sec4">
					<dt>活动说明</dt>
					<dd>
						<p><span class="list"> </span><span class="list_text">用户可通过“币伯钱包“APP查看活动所获糖果数：“我的” - “活动” - “有你计划活动”</span></p>
						<p><span class="list"> </span><span class="list_text">活动所得糖果将在活动结束5个工作日内发放至用户指定钱包账户。</span></p>
						<p><span class="list"> </span><span class="list_text">同一设备登录即视为同一用户。</span></p>
						<p><span class="list"> </span><span class="list_text">以下行为在本活动中将视为违规，主办方有权取消用户参与活动资格，且用户活动所得糖果将不予发放：</span>
							<ul>
								<li>a. 以非法盈利为目的参与活动；</li>
								<li>b. 恶意使用多个账号参与活动；</li>
								<li>c. 通过机器人软件或其他自动方式参与活动；</li>
								<li>d. 其他非真实领取的作弊行为。</li>
							</ul>
						</p>
						<p><span class="list"> </span><span class="list_text">若活动期间出现不可抗因素或大面积恶意套利行为、通讯线路故障、计算机大规模瘫痪等原因导致活动难以继续开展，主办方有权修改、暂停或取消本活动。</span></p>
						<p><span class="list"> </span><span class="list_text">若因用户电子设备不支持或其他系统问题导致用户无法正常参与活动等情况，主办方不承担相关责任。</span></p>
						<p><span class="list"> </span><span class="list_text">活动最终解释权归“币伯钱包”研发中心所有。</span></p>
					</dd>
				</dl>
			</div>
		</div>
	</body>

</html>
<script type="text/javascript">
	//适配移动端
		function resize() {
			var deviceWidth = document.documentElement.clientWidth;
			if (deviceWidth < 240) deviceWidth = 240;
				document.documentElement.style.cssText = 'font-size:' + (deviceWidth / 15) + 'px!important';
		}
		window.addEventListener('resize',resize);
		resize();
		var recomendList = '{$list}';
		var list = $.parseJSON(recomendList);
    if ( list.length == 0 ) {
        $('.no').text('您暂无推荐好友！');
    }else {
        $('.normal').css({display:'block'});
        console.log(list);
        for(var i=0;i<list.length;i++) {
            if ( list[i].mobile != '' ) {
                var val = list[i].mobile;
                var reg = /^(\d{3})\d{3}(\d{5})$/;
                val = val.replace(reg, "$1***$2");
            }else if ( list[i].email != '' ) {
                var val = list[i].email;
                var reg = /(.{3}).+(@)(.{3})/;
                val = val.replace(reg, "$1***$2");
            }else {
                var val = '138***88888'
            }
            var html = '<li>'+
                '<span>'+val+'</span>'+
                '<span>获得'+list[i].recommended_amount+'个cam</span>'+
                '</li>';
            $('.main3-sec4 ul').append(html);
		}
    }
</script>